home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / includes / pmevent.h < prev    next >
C/C++ Source or Header  |  1996-11-18  |  10KB  |  252 lines

  1. /**[f******************************************************************
  2.  *      PMEvent.h -- Header file for PageMaker event
  3.  *
  4.  *      Copyright (c) 1996 Adobe Systems, Inc. All Rights Reserved
  5.  *
  6.  *      
  7.  * ABSTRACT: Header file for PageMaker event. 
  8.  *
  9.  * USAGE: Event notification
  10.  *
  11.  *
  12.  *
  13.  **f]******************************************************************/
  14. #ifndef __PMEVENT_H
  15. #define __PMEVENT_H
  16.  
  17. #include "CIWindow.h"
  18.  
  19. #define PMEventID       unsigned long
  20.  
  21. typedef struct _PMEvent 
  22. {
  23.     //      EventID, see the definition below.
  24.     PMEventID       eventID;
  25.     PMBool            wasHandled;     // Event has been handled by other
  26.                             // Plugins.
  27.     //      This is intend to be a pointer to a event dependent structure.
  28.     //      But it is not necessary to be a pointer. 
  29.     void *          lParm;
  30. } PMEvent, *LPPMEvent;
  31.  
  32. #ifdef __cplusplus
  33. // MAC ONLY INFORMATION
  34. // helper information to the raw EventRecord for MAC
  35. typedef enum 
  36. {
  37.     eResize = 1,                    // this message is received after PM has resized the window
  38.     eActivate = 2,                  // activation 
  39.     eDeactivate = 3,                // deactivation
  40.     eMove = 4,                      // move window
  41.     eClose = 5,                             // close window
  42.     eMenuCmd = 6,                   // menu command
  43.     eMenuHit = 7,                   // menu hit message
  44.     eMouseMove = 8,                 // mouse move
  45.     eMouseDrag = 9,                 // mouse drag
  46.     eLButtonDn = 10,                // left button down
  47.     eRButtonDn = 11,                // right button down
  48.     eLButtonUp = 12,                // left button up
  49.     eLButtonDblClk = 13,    // left button double click
  50.     eLButtonTrpClk = 14,    // left button triple click
  51.     eHScroll = 15,                  // horizontal scroll
  52.     eVScroll = 16,                  // vertical scroll
  53.     eControlCmd = 17,               // message from control (button, listbox, etc.)
  54.     eKeyCmd = 18,                   // key command
  55.     ePaint = 19,                    // paint
  56.     eShow = 20,                     // palette about to be shown
  57.     eHide = 21,                     // palette just hidden
  58.     ePassback = 22                  // none of the above
  59. } PMSysEventID;                 
  60. // END MAC ONLY INFORMATION
  61.  
  62. typedef struct _PMSysEvent
  63. {
  64.     CIPMWindow *thePMWindow;
  65.  
  66. #if defined(WINDOWS)
  67.     HWND    hWnd;
  68.     UINT    message;
  69.     WPARAM  wParam;
  70.     LPARAM  lParam;
  71. #endif
  72. #if defined(MACINTOSH)
  73.     EventRecord *pEvent;
  74. #endif
  75.     PMBool wasHandled;                // return TRUE if plugin handled the event and want PageMaker
  76.     PMSysEventID sysEventID;// helper information on what really happen
  77.                             // to stop processing the event.
  78. } PMSysEvent, *LPPMSysEvent;
  79.  
  80. #endif
  81.  
  82. //      PageMaker EventID
  83. //
  84. //      Important: If you add new event, please also update the TOTAL_EVENT
  85. //      too. The convention for PMEventID is PMEVT_s1_s2_s3
  86. //      where   s1 is the functional area, print for example. 
  87. //                      s2, s3 will be whatever that event can be. 
  88.  
  89. enum PM_EVENT_ID
  90. {
  91.     PMEVT_APP=0,
  92.     PMEVT_APP_IDLETIMER,                            // timer
  93.     PMEVT_MENUCOMMAND_BEFORE,
  94.     PMEVT_COLOR_AFTER,                                // color changed via color palette            
  95.     PMEVT_NEWPUB_AFTER,
  96.     PMEVT_OPENPUB_BEFORE,
  97.     PMEVT_OPENPUB_AFTER,
  98.     PMEVT_CLOSEPUB_BEFORE,
  99.     PMEVT_CLOSEPUB_AFTER,
  100.     PMEVT_SAVEAS_BEFORE,
  101.     PMEVT_SAVE_AFTER,
  102.     PMEVT_REVERTPUB_BEFORE,
  103.     PMEVT_REVERTPUB_AFTER,
  104.     PMEVT_REVERTPAGE_BEFORE,
  105.     PMEVT_REVERTPAGE_AFTER,
  106.     PMEVT_PLACE_BEFORE,
  107.     PMEVT_EXPORT_BEFORE,
  108.     PMEVT_EXPORT_AFTER,
  109.     PMEVT_UNLINK_BEFORE,
  110.     PMEVT_UNLINK_AFTER,
  111.     PMEVT_RELINK_BEFORE,
  112.     PMEVT_RELINK_AFTER,
  113.     PMEVT_DOCUMENTSETUP_AFTER,
  114.     PMEVT_PREFERENCES_AFTER,
  115.     PMEVT_UNDO_OR_REDO_AFTER,
  116.     PMEVT_CUT_AFTER,
  117.     PMEVT_COPY_AFTER,
  118.     PMEVT_PASTE_AFTER,
  119.     PMEVT_MULTIPLEPASTE_BEFORE,
  120.     PMEVT_MULTIPLEPASTE_AFTER,
  121.     PMEVT_SELECTALL_AFTER,
  122.     PMEVT_BOOK_AFTER,
  123.     PMEVT_INDEX_AFTER,
  124.     PMEVT_CREATEINDEX_AFTER,
  125.     PMEVT_CREATETOC_AFTER,
  126.     PMEVT_TRAPPINGOPTION_BEFORE,
  127.     PMEVT_TRAPPINGOPTION_AFTER,
  128.     PMEVT_VIEW_AFTER,
  129.     PMEVT_COLUMNGUIDE_AFTER,
  130.     PMEVT_RULERGUIDE_AFTER,
  131.     PMEVT_GUIDES_RULES_AFTER,
  132.     PMEVT_GOTOPAGE_BEFORE,
  133.     PMEVT_GOTOPAGE_AFTER,
  134.     PMEVT_INSERTPAGES_BEFORE,
  135.     PMEVT_INSERTPAGES_AFTER,
  136.     PMEVT_REMOVEPAGES_BEFORE,
  137.     PMEVT_REMOVEPAGES_AFTER,
  138.     PMEVT_DISPLAYMASTERITEMS_AFTER,
  139.     PMEVT_DISPLAYNONPRINT_AFTER,
  140.     PMEVT_AUTOFLOW_AFTER,
  141.     PMEVT_LAYOUTADJUSTMENT_AFTER,
  142.     PMEVT_TYPESPEC_AFTER,
  143.     PMEVT_PARASPEC_AFTER,
  144.     PMEVT_INDENTTAB_AFTER,
  145.     PMEVT_HYPENATION_AFTER,
  146.     PMEVT_ALIGNMENT_AFTER,
  147.     PMEVT_STYLE_AFTER,
  148.     PMEVT_DEFINESTYLE_AFTER,
  149.     PMEVT_EDITSTYLE_AFTER,
  150.     PMEVT_LINE_AFTER,
  151.     PMEVT_FILL_AFTER,
  152.     PMEVT_LINEFILL_AFTER,
  153.     PMEVT_POLYGONSETTING_AFTER,
  154.     PMEVT_ROUNDCORNER_AFTER,
  155.     PMEVT_CMSPROFILE_AFTER,
  156.     PMEVT_MASK_AFTER,
  157.     PMEVT_TEXTWRAP_AFTER,
  158.     PMEVT_NON_PRINT_AFTER,
  159.     PMEVT_LINKOPTION_AFTER,
  160.     PMEVT_DEFINECOLOR_AFTER,
  161.     PMEVT_EDITCOLOR_AFTER,
  162.     PMEVT_SAVEGRAPHIC_BEFORE,
  163.     PMEVT_SAVEGRAPHIC_AFTER,
  164.     PMEVT_FRONTBACK_AFTER,
  165.     PMEVT_GROUP_AFTER,
  166.     PMEVT_LOCK_AFTER,
  167.     PMEVT_REMOVETRANSFORM_AFTER,
  168.     
  169.     PMEVT_RESIZEOBJECT_BEFORE,
  170.     PMEVT_RESIZEOBJECT_AFTER,
  171.     PMEVT_MOVEOBJECT_BEFORE,
  172.     PMEVT_MOVEOBJECT_AFTER,
  173.     PMEVT_LAYOUT_DRAWOBJECT_BEFORE,
  174.     PMEVT_DRAWOBJECT_AFTER,
  175.     PMEVT_TRANSFORMOBJECT_BEFORE,
  176.     PMEVT_TRANSFORMOBJECT_AFTER,
  177.     PMEVT_CROPOBJECT_BEFORE,
  178.     PMEVT_CROPOBJECT_AFTER,
  179.     PMEVT_CREATEOBJECT_AFTER,
  180.     PMEVT_DELETEOBJECT_BEFORE,
  181.     PMEVT_SELECTOBJECT_AFTER,                               
  182.     PMEVT_DESELECTOBJECT_BEFORE,
  183.     PMEVT_OBJECT_DBLCLICK_BEFORE,                   // double click on object with pointer tool                   
  184.     PMEVT_HLINK_CLICK_BEFORE,                        // clicked on hyperlink
  185.     
  186.     PMEVT_RESIZE_APPWINDOW_AFTER,                   
  187.     PMEVT_ACTIVATE_APPWINDOW_AFTER,                
  188.     PMEVT_DEACTIVATE_APPWINDOW_BEFORE,             
  189.     
  190.     PMEVT_RESIZE_LAYOUTWINDOW_AFTER,                
  191.     PMEVT_ACTIVATE_LAYOUTWINDOW_AFTER,            
  192.     PMEVT_DEACTIVATE_LAYOUTWINDOW_BEFORE,   
  193.  
  194.     PMEVT_RESIZE_STORYEDITWINDOW_AFTER,                
  195.     PMEVT_ACTIVATE_STORYEDITWINDOW_AFTER,            
  196.     PMEVT_DEACTIVATE_STORYEDITWINDOW_BEFORE,   
  197.  
  198.     PMEVT_PRINT_BEFORE,
  199.     PMEVT_PRINT_DSCHEADER_AFTER,                    // before PageMaker finishes up DSC header (PostScript only)
  200.     PMEVT_PRINT_PROLOG_BEFORE,                              // before download PostScript prolog (PostScript only
  201.     PMEVT_PRINT_PROLOG_AFTER,                               // after download PostScript prolog (PostScript only
  202.     PMEVT_PRINT_DOCSETUP_BEFORE,                    // before print job setup
  203.     PMEVT_PRINT_DOCSETUP_AFTER,                             // after print job setup
  204.     PMEVT_PRINT_DSCCOMMENT_PAGELEVEL,               // page level DSC comments (PostScript only)
  205.     PMEVT_PRINT_PAGESETUP_BEFORE,                   // before page setup
  206.     PMEVT_PRINT_PAGESETUP_AFTER,                    // after page setup
  207.     PMEVT_PRINT_OBJECT_BEFORE,                              // before each object
  208.     PMEVT_PRINT_OBJECT_AFTER,                               // after each object
  209.     PMEVT_PRINT_PAGETRAILER_BEFORE,                 // before page trailer (PostScript only)
  210.     PMEVT_PRINT_PAGETRAILER_AFTER,                  // after page trailer (PostScript only)
  211.     PMEVT_PRINT_PRMARKS_BEFORE,                             // before printer marks (PostScript only)
  212.     PMEVT_PRINT_PRMARKS_AFTER,                              // after printer marks (PostScript only)
  213.     PMEVT_PRINT_JOBTRAILER_BEFORE,                  // before print job trailer (PostScript only)
  214.     PMEVT_PRINT_JOBTRAILER_AFTER,                   // after print job trailer (PostScript only)
  215.  
  216.     PMEVT_HYPHENATE_WORD,                                   // before PageMaker hyphenate a word
  217.  
  218.     PMEVT_TEXTSTORY_ENTER_AFTER,                    // after entering a text story during text tool 
  219.     PMEVT_TEXT_SELECT_AFTER,                                // after text selection/text caret  during text tool
  220.     PMEVT_TEXT_ENTER_AFTER,                                 // after entering text during text tool
  221.     PMEVT_TEXT_DELETE_AFTER,                                // after deleting text during text tool
  222.     PMEVT_OBJEDIT_MEDIA_IMAGE,                        // when double-clicking image when image has pluginType non-null.
  223.     PMEVT_APP_STARTUP_AFTER,                    // after PageMaker is initialized (during startup)
  224.     PMEVT_TEXT_DELETE_BEFORE,                               // before deleting text during text tool
  225.     PMEVT_PLUGIN_COMMAND_BEFORE,                    // before processing a plugin command
  226.     PMEVT_PLUGIN_COMMAND_AFTER,                        // after processing a plugin command
  227.     PMEVT_APP_SHUTDOWN,                                // PageMaker is shutting down
  228.  
  229.     PMEVT_SE_TEXT_SELECT_AFTER,                             // after text selection/text caret during story editor
  230.     PMEVT_SE_TEXT_ENTER_AFTER,                              // after entering text during story editor
  231.     PMEVT_SE_TEXT_DELETE_AFTER,                             // after deleting text during story editor
  232.     PMEVT_SE_TEXT_DELETE_BEFORE,                            // before deleting text during story editor
  233.  
  234.     PMEVT_PLUGINS_STARTUP_AFTER,                            // after PageMaker has initialized plugins (during startup, changeenv)
  235.     PMEVT_PLUGINS_SHUTDOWN,                                    // before PageMaker shuts down plugins (before quit, changeenv)
  236.     
  237.     PMEVT_DELETESTYLE_AFTER,
  238.     PMEVT_DELETECOLOR_AFTER,
  239.  
  240.     PMEVT_SAVE_BEFORE,                                // before a named-pub is saved.
  241.  
  242.     PMEVT_PAGEADJUST_AFTER,                            // after each page spread adjustment
  243.     PMEVT_DOCADJUST_AFTER,                            // after the document adjustment
  244.  
  245.     PMEVT_EVENT_END
  246. };
  247.  
  248. #define TOTAL_EVENTS                                    PMEVT_EVENT_END
  249. #endif
  250.  
  251.  
  252.